package com.shangma.utils;

//异步任务工厂
public class AsyncFactory {

    //短信任务
    public static Runnable sendValicode(String uphone,String code){
        return new Runnable() {
            @Override
            public void run()
            {
                try {
                    Thread.sleep(4000);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
                System.out.println(Thread.currentThread().getName()+"=---短信发送");
            }
        };
    }

    //发邮件任务
//    public static Runnable otherAsyncTask(){
//
//    }
}